home *** CD-ROM | disk | FTP | other *** search
/ Dynamic HTML Construction Kit / Dynamic HTML Construction Kit.iso / source_code / dhtmlunl / dhtml.exe / CD Content / Chap24 / dun24_3.txt < prev   
Encoding:
Text File  |  1997-12-18  |  1.4 KB  |  56 lines

  1. <HTML>
  2. <HEAD>
  3. <TITLE>Special Effects</TITLE>
  4.  
  5. <SCRIPT LANGUAGE="VBScript">
  6. sub doFade(obj)
  7.     if obj.filters.blendTrans.status=0 then
  8.         obj.filters.blendTrans.apply()
  9.         obj.style.visibility="hidden"
  10.     obj.filters.blendTrans.play()
  11.     end if
  12. end sub
  13.  
  14. sub doTrans(obj)
  15.     if obj.filters.revealTrans.status=0 then
  16.         obj.filters.revealTrans.apply()
  17.  
  18.         if right(obj.src,5)="1.gif" then
  19.             obj.src="balloon2.gif"
  20.         else
  21.             obj.src="balloon1.gif"
  22.         end if
  23.  
  24.         obj.filters.revealTrans.transition=TransType.value
  25.         obj.filters.revealTrans.play()
  26.     end if
  27. end sub
  28. </SCRIPT>
  29. </HEAD>
  30.  
  31. <BODY>
  32. <IMG SRC="balloon4.gif"
  33.      id=balloon1
  34.      STYLE="position:absolute;
  35.             left:50;
  36.             top:150;
  37.             width:92;
  38.             height:164;
  39.             filter:blendTrans()">
  40. <IMG SRC="balloon1.gif"
  41.      id=balloon2
  42.      STYLE="position:absolute;
  43.             left:150;
  44.             top:150;
  45.             width:92;
  46.             height:164;
  47.             filter:revealTrans()">
  48. <P>
  49. <INPUT TYPE=BUTTON VALUE="Fade Out" onClick="doFade(balloon1)"><P>
  50. Enter transition number (0-23):<BR>
  51. <INPUT NAME=TransType TYPE=TEXT VALUE="0"><BR>
  52. <INPUT TYPE=BUTTON VALUE="Do Transition" onClick="doTrans(balloon2)">
  53. </BODY>
  54.  
  55. </HTML>
  56.